#!/bin/bash
date=`date -d "+1 year" +%Y`
datetime=`date +%s -d "$date"0101`
while true 或者 until false
do
    datenow=`date +%s`
    if [ $[$datetime-$datenow] -eq 0 ]
    then
        break
    fi
        day=$[($datetime-$datenow)/86400]
        hour=$[($datetime-$datenow)%86400/3600]
        minute=$[($datetime-$datenow)%3600/60]
        second=$[($datetime-$datenow)%60]
    clear
        echo "离$date年还有$day天:$hour小时:$minute分钟:$second秒"
        sleep 1
done
    echo "`date +%Y`新年快乐呀"
